/**
 * Created by dujiaheng on 2016/8/17.
 */

function setLocalItem(key, value) {
    localStorage.setItem(key, JSON.stringify(value));
}

function getLocalItem(key) {
    return JSON.parse(localStorage.getItem(key));
}

function setSesstionItem(key, value) {
    sessionStorage.setItem(key, JSON.stringify(value));
}

function getSesstionItem(key) {
    return JSON.parse(sessionStorage.getItem(key));
}

export {setLocalItem,getLocalItem,setSesstionItem,getSesstionItem}
